{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 读取数据和引入模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:20.890729Z",
     "start_time": "2022-06-22T08:48:19.392424Z"
    }
   },
   "outputs": [],
   "source": [
    "import sklearn as sk\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.metrics import roc_curve\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "import toad"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:20.970753Z",
     "start_time": "2022-06-22T08:48:20.890729Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>installment_BIN</th>\n",
       "      <th>annual_inc_BIN</th>\n",
       "      <th>dti_BIN</th>\n",
       "      <th>revol_bal_BIN</th>\n",
       "      <th>open_il_24m_BIN</th>\n",
       "      <th>mths_since_rcnt_il_BIN</th>\n",
       "      <th>all_util_BIN</th>\n",
       "      <th>avg_cur_bal_BIN</th>\n",
       "      <th>bc_open_to_buy_BIN</th>\n",
       "      <th>mo_sin_old_il_acct_BIN</th>\n",
       "      <th>mo_sin_old_rev_tl_op_BIN</th>\n",
       "      <th>mort_acc_BIN</th>\n",
       "      <th>num_il_tl_BIN</th>\n",
       "      <th>num_rev_tl_bal_gt_0_BIN</th>\n",
       "      <th>percent_bc_gt_75_BIN</th>\n",
       "      <th>term_BIN</th>\n",
       "      <th>emp_length_BIN</th>\n",
       "      <th>home_ownership_BIN</th>\n",
       "      <th>verification_status_BIN</th>\n",
       "      <th>loan_status</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>16023</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83008</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>115373</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34581</th>\n",
       "      <td>5.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26174</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2</td>\n",
       "      <td>6.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18755</th>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>139375</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>105880</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107207</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120453</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>26313 rows × 20 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        installment_BIN  annual_inc_BIN  dti_BIN  revol_bal_BIN  \\\n",
       "16023               5.0             3.0      2.0            2.0   \n",
       "83008               3.0             3.0      2.0            4.0   \n",
       "115373              5.0             3.0      3.0            4.0   \n",
       "34581               5.0             4.0      2.0            3.0   \n",
       "26174               5.0             2.0      3.0            3.0   \n",
       "...                 ...             ...      ...            ...   \n",
       "18755               4.0             4.0      1.0            3.0   \n",
       "139375              4.0             3.0      1.0            2.0   \n",
       "105880              3.0             3.0      3.0            3.0   \n",
       "107207              2.0             2.0      4.0            3.0   \n",
       "120453              1.0             3.0      3.0            4.0   \n",
       "\n",
       "        open_il_24m_BIN  mths_since_rcnt_il_BIN  all_util_BIN  \\\n",
       "16023               4.0                     3.0           2.0   \n",
       "83008               3.0                     2.0           4.0   \n",
       "115373              3.0                     2.0           2.0   \n",
       "34581               3.0                     2.0           4.0   \n",
       "26174               3.0                     2.0           4.0   \n",
       "...                 ...                     ...           ...   \n",
       "18755               3.0                     3.0           4.0   \n",
       "139375              3.0                     2.0           1.0   \n",
       "105880              4.0                     1.0           4.0   \n",
       "107207              4.0                     1.0           4.0   \n",
       "120453              2.0                     3.0           3.0   \n",
       "\n",
       "        avg_cur_bal_BIN  bc_open_to_buy_BIN  mo_sin_old_il_acct_BIN  \\\n",
       "16023               1.0                 4.0                     4.0   \n",
       "83008               2.0                 1.0                     4.0   \n",
       "115373              1.0                 4.0                     4.0   \n",
       "34581               3.0                 2.0                     3.0   \n",
       "26174               1.0                 1.0                     3.0   \n",
       "...                 ...                 ...                     ...   \n",
       "18755               1.0                 1.0                     4.0   \n",
       "139375              2.0                 4.0                     4.0   \n",
       "105880              2.0                 3.0                     4.0   \n",
       "107207              1.0                 2.0                     3.0   \n",
       "120453              1.0                 3.0                     3.0   \n",
       "\n",
       "        mo_sin_old_rev_tl_op_BIN  mort_acc_BIN  num_il_tl_BIN  \\\n",
       "16023                        3.0           1.0            4.0   \n",
       "83008                        3.0           2.0            4.0   \n",
       "115373                       1.0           1.0            4.0   \n",
       "34581                        1.0           2.0            3.0   \n",
       "26174                        3.0           3.0            2.0   \n",
       "...                          ...           ...            ...   \n",
       "18755                        2.0           1.0            4.0   \n",
       "139375                       3.0           3.0            4.0   \n",
       "105880                       3.0           4.0            4.0   \n",
       "107207                       1.0           1.0            3.0   \n",
       "120453                       3.0           1.0            2.0   \n",
       "\n",
       "        num_rev_tl_bal_gt_0_BIN  percent_bc_gt_75_BIN  term_BIN  \\\n",
       "16023                       2.0                   1.0         1   \n",
       "83008                       3.0                   3.0         1   \n",
       "115373                      2.0                   1.0         2   \n",
       "34581                       3.0                   1.0         2   \n",
       "26174                       3.0                   4.0         2   \n",
       "...                         ...                   ...       ...   \n",
       "18755                       3.0                   3.0         1   \n",
       "139375                      4.0                   1.0         1   \n",
       "105880                      2.0                   2.0         1   \n",
       "107207                      3.0                   1.0         1   \n",
       "120453                      2.0                   3.0         1   \n",
       "\n",
       "        emp_length_BIN  home_ownership_BIN  verification_status_BIN  \\\n",
       "16023              3.0                   3                        1   \n",
       "83008              3.0                   2                        2   \n",
       "115373             3.0                   3                        2   \n",
       "34581              3.0                   1                        1   \n",
       "26174              6.0                   1                        3   \n",
       "...                ...                 ...                      ...   \n",
       "18755              3.0                   3                        1   \n",
       "139375             3.0                   1                        1   \n",
       "105880             4.0                   2                        2   \n",
       "107207             2.0                   3                        2   \n",
       "120453             3.0                   2                        2   \n",
       "\n",
       "        loan_status  \n",
       "16023             0  \n",
       "83008             1  \n",
       "115373            1  \n",
       "34581             0  \n",
       "26174             1  \n",
       "...             ...  \n",
       "18755             0  \n",
       "139375            0  \n",
       "105880            0  \n",
       "107207            0  \n",
       "120453            0  \n",
       "\n",
       "[26313 rows x 20 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_train = pd.read_csv('data_train.csv',index_col = 0)\n",
    "data_train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:20.986750Z",
     "start_time": "2022-06-22T08:48:20.973754Z"
    }
   },
   "outputs": [],
   "source": [
    "X_train = data_train.drop(columns = ['loan_status'])\n",
    "y_train = data_train['loan_status']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:21.002760Z",
     "start_time": "2022-06-22T08:48:20.988751Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((26313, 19), (26313,))"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train.shape,y_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:21.018746Z",
     "start_time": "2022-06-22T08:48:21.004754Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    19016\n",
       "1     7297\n",
       "Name: loan_status, dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_train.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:21.065759Z",
     "start_time": "2022-06-22T08:48:21.021749Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>installment_BIN</th>\n",
       "      <th>annual_inc_BIN</th>\n",
       "      <th>dti_BIN</th>\n",
       "      <th>revol_bal_BIN</th>\n",
       "      <th>open_il_24m_BIN</th>\n",
       "      <th>mths_since_rcnt_il_BIN</th>\n",
       "      <th>all_util_BIN</th>\n",
       "      <th>avg_cur_bal_BIN</th>\n",
       "      <th>bc_open_to_buy_BIN</th>\n",
       "      <th>mo_sin_old_il_acct_BIN</th>\n",
       "      <th>mo_sin_old_rev_tl_op_BIN</th>\n",
       "      <th>mort_acc_BIN</th>\n",
       "      <th>num_il_tl_BIN</th>\n",
       "      <th>num_rev_tl_bal_gt_0_BIN</th>\n",
       "      <th>percent_bc_gt_75_BIN</th>\n",
       "      <th>term_BIN</th>\n",
       "      <th>emp_length_BIN</th>\n",
       "      <th>home_ownership_BIN</th>\n",
       "      <th>verification_status_BIN</th>\n",
       "      <th>loan_status</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>48588</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>6.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>633</th>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100990</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28846</th>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>142311</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1</td>\n",
       "      <td>6.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17896</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89587</th>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113265</th>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70041</th>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35755</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>2</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>6579 rows × 20 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        installment_BIN  annual_inc_BIN  dti_BIN  revol_bal_BIN  \\\n",
       "48588               5.0             2.0      2.0            3.0   \n",
       "633                 2.0             1.0      1.0            2.0   \n",
       "100990              1.0             3.0      1.0            1.0   \n",
       "28846               5.0             3.0      1.0            3.0   \n",
       "142311              4.0             3.0      4.0            5.0   \n",
       "...                 ...             ...      ...            ...   \n",
       "17896               2.0             3.0      3.0            1.0   \n",
       "89587               4.0             2.0      3.0            3.0   \n",
       "113265              4.0             3.0      4.0            3.0   \n",
       "70041               3.0             2.0      4.0            3.0   \n",
       "35755               5.0             2.0      4.0            4.0   \n",
       "\n",
       "        open_il_24m_BIN  mths_since_rcnt_il_BIN  all_util_BIN  \\\n",
       "48588               2.0                     3.0           1.0   \n",
       "633                 1.0                     4.0           2.0   \n",
       "100990              2.0                     2.0           4.0   \n",
       "28846               1.0                     4.0           1.0   \n",
       "142311              3.0                     2.0           4.0   \n",
       "...                 ...                     ...           ...   \n",
       "17896               4.0                     2.0           4.0   \n",
       "89587               4.0                     2.0           4.0   \n",
       "113265              4.0                     2.0           4.0   \n",
       "70041               2.0                     2.0           2.0   \n",
       "35755               4.0                     2.0           3.0   \n",
       "\n",
       "        avg_cur_bal_BIN  bc_open_to_buy_BIN  mo_sin_old_il_acct_BIN  \\\n",
       "48588               2.0                 4.0                     3.0   \n",
       "633                 1.0                 2.0                     4.0   \n",
       "100990              2.0                 1.0                     4.0   \n",
       "28846               2.0                 4.0                     4.0   \n",
       "142311              2.0                 1.0                     4.0   \n",
       "...                 ...                 ...                     ...   \n",
       "17896               3.0                 2.0                     4.0   \n",
       "89587               1.0                 2.0                     3.0   \n",
       "113265              1.0                 1.0                     4.0   \n",
       "70041               1.0                 3.0                     4.0   \n",
       "35755               2.0                 3.0                     3.0   \n",
       "\n",
       "        mo_sin_old_rev_tl_op_BIN  mort_acc_BIN  num_il_tl_BIN  \\\n",
       "48588                        2.0           3.0            2.0   \n",
       "633                          1.0           1.0            2.0   \n",
       "100990                       3.0           2.0            3.0   \n",
       "28846                        3.0           3.0            1.0   \n",
       "142311                       3.0           2.0            3.0   \n",
       "...                          ...           ...            ...   \n",
       "17896                        3.0           3.0            4.0   \n",
       "89587                        1.0           1.0            4.0   \n",
       "113265                       2.0           1.0            4.0   \n",
       "70041                        2.0           1.0            3.0   \n",
       "35755                        3.0           3.0            3.0   \n",
       "\n",
       "        num_rev_tl_bal_gt_0_BIN  percent_bc_gt_75_BIN  term_BIN  \\\n",
       "48588                       3.0                   1.0         1   \n",
       "633                         2.0                   3.0         1   \n",
       "100990                      1.0                   1.0         1   \n",
       "28846                       2.0                   1.0         1   \n",
       "142311                      3.0                   4.0         1   \n",
       "...                         ...                   ...       ...   \n",
       "17896                       1.0                   1.0         1   \n",
       "89587                       3.0                   3.0         1   \n",
       "113265                      3.0                   3.0         1   \n",
       "70041                       2.0                   3.0         1   \n",
       "35755                       4.0                   4.0         2   \n",
       "\n",
       "        emp_length_BIN  home_ownership_BIN  verification_status_BIN  \\\n",
       "48588              6.0                   1                        1   \n",
       "633                1.0                   2                        2   \n",
       "100990             3.0                   1                        2   \n",
       "28846              3.0                   1                        1   \n",
       "142311             6.0                   1                        3   \n",
       "...                ...                 ...                      ...   \n",
       "17896              2.0                   1                        2   \n",
       "89587              1.0                   3                        1   \n",
       "113265             3.0                   3                        1   \n",
       "70041              3.0                   3                        2   \n",
       "35755              3.0                   1                        3   \n",
       "\n",
       "        loan_status  \n",
       "48588             0  \n",
       "633               1  \n",
       "100990            0  \n",
       "28846             0  \n",
       "142311            0  \n",
       "...             ...  \n",
       "17896             0  \n",
       "89587             0  \n",
       "113265            0  \n",
       "70041             0  \n",
       "35755             0  \n",
       "\n",
       "[6579 rows x 20 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_test = pd.read_csv('data_test.csv',index_col = 0)\n",
    "data_test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:21.080763Z",
     "start_time": "2022-06-22T08:48:21.069762Z"
    }
   },
   "outputs": [],
   "source": [
    "X_test = data_test.drop(columns = ['loan_status'])\n",
    "y_test = data_test['loan_status']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:21.096675Z",
     "start_time": "2022-06-22T08:48:21.082764Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((6579, 19), (6579,))"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_test.shape,y_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:48:21.111679Z",
     "start_time": "2022-06-22T08:48:21.098672Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    4777\n",
       "1    1802\n",
       "Name: loan_status, dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_test.value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 模型训练"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 网格搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:54:11.851156Z",
     "start_time": "2022-06-22T08:48:21.114669Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 168 candidates, totalling 504 fits\n",
      "RandomForest model best_score_ is 0.49335887920681204,and best_params_ is {'class_weight': {1: 3, 0: 1}, 'max_depth': 7, 'n_estimators': 300}\n"
     ]
    }
   ],
   "source": [
    "rf_param={'n_estimators': list(range(50, 400, 50)),'max_depth': list(range(2, 10, 1)),'class_weight': [{1: 1, 0: 1}, {1: 2, 0: 1}, {1: 3, 0: 1}]}\n",
    "rf_gsearch = GridSearchCV(estimator=RandomForestClassifier(random_state=0, criterion='entropy',max_features=0.8, bootstrap=True),param_grid=rf_param, cv=3, scoring='f1', n_jobs=-1, verbose=2)\n",
    "rf_gsearch.fit(X_train,y_train)\n",
    "print('RandomForest model best_score_ is {0},and best_params_ is {1}'.format(rf_gsearch.best_score_,rf_gsearch.best_params_))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 训练模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:54:13.635209Z",
     "start_time": "2022-06-22T08:54:11.854147Z"
    }
   },
   "outputs": [],
   "source": [
    "RF_model= RandomForestClassifier(random_state=0, n_jobs=-1, criterion='entropy',\n",
    "                                        n_estimators=rf_gsearch.best_params_['n_estimators'],\n",
    "                                        max_depth=rf_gsearch.best_params_['max_depth'],\n",
    "                                        max_features=0.8,\n",
    "                                        min_samples_split=50,\n",
    "                                        class_weight=rf_gsearch.best_params_['class_weight'],\n",
    "                                        bootstrap=True)\n",
    "RF_model_fit = RF_model.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 预测与评估"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 混淆矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:54:13.904765Z",
     "start_time": "2022-06-22T08:54:13.635209Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>预测为好</th>\n",
       "      <th>预测为坏</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>标签为好</th>\n",
       "      <td>2600</td>\n",
       "      <td>2177</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>标签为坏</th>\n",
       "      <td>453</td>\n",
       "      <td>1349</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      预测为好  预测为坏\n",
       "标签为好  2600  2177\n",
       "标签为坏   453  1349"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_pred_test = RF_model_fit.predict(X_test)\n",
    "y_pred_train = RF_model_fit.predict(X_train)\n",
    "cnf_matrix = sk.metrics.confusion_matrix(y_test, y_pred_test)\n",
    "cnf_matrix = pd.DataFrame(cnf_matrix,index = [\"标签为好\",\"标签为坏\"],columns = ['预测为好','预测为坏'])\n",
    "cnf_matrix"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 评估指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:54:14.012791Z",
     "start_time": "2022-06-22T08:54:13.906768Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>准确率</th>\n",
       "      <th>AUC</th>\n",
       "      <th>KS值</th>\n",
       "      <th>PSI</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.600243</td>\n",
       "      <td>0.702716</td>\n",
       "      <td>0.295188</td>\n",
       "      <td>0.000108</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        准确率       AUC       KS值       PSI\n",
       "0  0.600243  0.702716  0.295188  0.000108"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "accuracy=sk.metrics.accuracy_score(y_test,y_pred_test)\n",
    "y_score=RF_model_fit.predict_proba(X_test)[:,1]\n",
    "auc=sk.metrics.roc_auc_score(y_test,y_score)\n",
    "fpr,tpr,threshold=sk.metrics.roc_curve(y_test,y_score)\n",
    "ks=max([trp_ - fpr_ for trp_, fpr_ in zip(tpr, fpr)])\n",
    "psi=toad.metrics.PSI(y_pred_train,y_pred_test)\n",
    "estimate=pd.DataFrame([[accuracy,auc,ks,psi]],columns=['准确率','AUC','KS值','PSI'])\n",
    "estimate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-06-22T08:54:14.314858Z",
     "start_time": "2022-06-22T08:54:14.014790Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90b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l9B9QBitdbHtNY5wGxgRJFjRgCfa8NmIEopVdefMWitN2qtL+Y/3IxR0t5MnnwfAH4PzAfOmXx+T2O4D1igtY4D0FrbFYcGqiilFFAZo0PlmRWA1vrH/DZLYuVn0gl9otQx+aGPlDqmfFb2GW9i8kcfKm1MlvYnX9idoOoD8YUeJ+Q/V9pjrI6hsAkYv72a6aoxKKXqA3cAM7CGJ9+HlkA1pdRapdQOpdQYm+KYDrQBTgN7gSe01m4LYimJlZ9JJ/QJb2IqzIo+UpQT+kypY8I/fai0Mdndn0rkUUVdC6linis6792TY6yOwThQqQEYna+fief3NIZ3gKlaa5fxi47pPIkhDOgKDAQqAJuUUpu11of9HMfNwC7gRuAaYJVS6ietdaqJcVyJlZ9JJ/SJopzQR35zqmKe83efKcopfai0Mdndn0pkd4JKABoWetwAI4uX9hirY0Ap1QH4CBiqtb5g4vk9jaEbMDu/o0UDw5RSeVrr//gxhgTgvNY6HUhXSv0IdATM7FyexDEOeE0bg+axSqnjQGtgq4lxXImVn0kn9AlvYrK6j3gTk9V9xpuY/NGHShuT3f2pZHbeAMNIkMeApvz3Bl7bIsfcwq9vCG+1IYZGQCzQx67vQ5HjZ2H+JAlPvg9tgO/zj60I7APa2RDHB8AL+V/XBk4B0SbH0YSSJ0lY9pl0Qp/wMiZL+4g3MRU53vQ+4+X3yfI+5EVMlvcnb//YegWltc5TSk0BVmDMNvlEax2jlJqU//oMjNk3wzA+/BkY2d7fMfwNqAG8n//bWJ42cRdgD2OwlCcxaK0PKKWWA3sAN/CR1rrYqdhWxgH8A5illNqL8UN6qtbatLIBSqmvgRuAaKVUAvA8EF7o/JZ9Jp3QJ7yMydI+4mVMfuWUPlTamLC4P/lCtjoSQgjhSHbP4hNCCCGKJQlKCCGEI0mCEkII4UiSoIQQQjiSJCghhBCOJAlKCCGEI0mCEkII4Uj/DynI3Rwd4YanAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "y_proba = RF_model_fit.predict_proba(X_test)\n",
    "fig,(axe1,axe2) = plt.subplots(1,2,sharey = True)\n",
    "for i in range(len(np.unique(y_test))):\n",
    "    fpr,tpr,thresholds = roc_curve(y_test,y_proba[:,i],pos_label = i)\n",
    "axe1.plot(fpr,tpr)\n",
    "axe1.plot([0,1],[0,1])\n",
    "axe1.set_title('ROC')\n",
    "axe2.plot(1 - thresholds,tpr,label = 'TPR')\n",
    "axe2.plot(1 - thresholds,fpr,label = 'FPR')\n",
    "plt.xlim(0,)\n",
    "axe2.set_title('KS')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
